<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <h1>登录页面</h1>
  <input type="text" name='username' placeholder="请输入用户名" class="input1">
  <input type="password" name='password' placeholder="请输入密码" class="input2">
  <input type="submit" value="登录" id="btn">
  <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  <script>
    axios.post('http://localhsot:9090/login',{
      username: document.getElementsByClassName('input1').value,
      password: document.getElementsByClassName('input2').value
    }).then((res) => {
      console.log(res)
    })
  </script>
</body>
</html>